import request from 'umi-request';

export async function getName() {
  return new Promise(resolve => {
    setTimeout(() => {
      console.log("fetched user");
      resolve({
        name: "测试数据"
      });
    }, 5000);
  });
}

export async function getList() {
  return new Promise(resolve => {
    setTimeout(() => {
      console.log("fetched user");
      resolve([
        {
          id: 0,
          name: "I get by with a little help from my friends",
        },
        {
          id: 1,
          name: "I'd like to be under the sea in an octupus's garden",
        },
        {
          id: 2,
          name: "You got that sand all over your feet",
        }
      ]);
    }, 6000);
  });
}